import request from "../utils/request.js";
export function selectGetAll(current, size, advTitle, statusId) {
  return request({
    url: "/adv/selectGetAll",
    method: "get",
    params: {
      current,
      size,
      advTitle,
      statusId,
    },
  });
}
export function updateStatus(id, statusId) {
  return request({
    url: "/adv/updateStatus",
    method: "post",
    params: {
      id,
      statusId,
    },
  });
}
export const deleteImgFile = (file) => {
  return request({
    url: "/oss/deleteImgFile",
    method: "post",
    params: {
      file,
    },
  });
};
export function getInsert(adv) {
  return request({
    url: "/adv/getInsert",
    method: "post",
    params: {},
    data: adv,
  });
}
export function selectAllById(id) {
  return request({
    url: "/adv/selectAllById",
    method: "post",
    params: { id },
  });
}

export function getUpdateById(adv) {
  return request({
    url: "/adv/getUpdateById",
    method: "post",
    params: {},
    data: adv,
  });
}
export function getDeleteById(id) {
  return request({
    url: "/adv/getDeleteById",
    method: "post",
    params: { id },
  });
}
